Method and apparatus for processing web content, device, and computer storage medium

ABSTRACT

A method and an apparatus for processing web content, a device, and a computer storage medium are provided. A long-term feature group and a short-term feature group are determined from historical browsing data of a user according to generation time points of elements in the historical browsing data. A long-term encoding vector corresponding to the long-term feature group is determined according to similarities between elements in the long-term feature group, a user embedding vector corresponding to the short-term feature group is determined according to the long-term encoding vector and similarities between elements in the short-term feature group, and at least one web content is determined as a recommendation candidate and provided to the user.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a bypass continuation application of InternationalApplication No. PCT/CN2020/092575, filed on May 27, 2020, which claimspriority to Chinese Patent Application No. 201910451826.2 filed on May28, 2019 with the China National Intellectual Property Administration,the disclosures of which are herein incorporated by reference in theirentireties.

FIELD

The disclosure relates to the field of data processing, and inparticular, to a method and an apparatus for processing web content, adevice, and a computer storage medium.

BACKGROUND

Users can browse various web content via smart terminals. For example,users may read, play, and view web content. The smart terminal or anapplication on the smart terminal can recommend web content for the userin the browsing process, which may be of interest to the user, so as toimprove browsing experience of the user.

In the related art, a personalized recommendation method extracts tagsfrom articles read by a user (or videos watched by the user) in history,and use the tags to match recommendation candidates, or determine anitem most similar to articles or videos previously read or watched by auser for recommendation.

However, because preferences of the user in a viewing history (such asarticles or videos viewed by the user) are not considered, the relatedart method does not fully satisfy the browsing interests of the user.

SUMMARY

Embodiments of the disclosure provide a method and an apparatus forprocessing web content, a device, and a computer storage medium, whicheffectively improve the quality of web content recommended for users.

The following technical solutions are disclosed in the embodiments ofthe disclosure:

An embodiment of the disclosure provides a method for processing webcontent, the method including:

determining a long-term feature group and a short-term feature groupfrom historical browsing data of a user according to generation timepoints of elements in the historical browsing data;

determining a long-term encoding vector corresponding to the long-termfeature group according to similarities between elements in thelong-term feature group;

determining a user embedding vector corresponding to the short-termfeature group according to the long-term encoding vector andsimilarities between elements in the short-term feature group; and

determining, according to the user embedding vector, at least one webcontent as a recommendation candidate and providing the at least one webcontent to the user.

An embodiment of the disclosure further provides a method for processingweb content, performed a server, the server including one or moreprocessors, a memory, and one or more programs, the one or more programsbeing stored in the memory, the program including one or more units,each unit corresponding to a set of instructions, the one or moreprocessors being configured to execute the instructions; the methodincluding:

determining a long-term feature group and a short-term feature groupfrom historical browsing data of a user according to generation timepoints of elements in the historical browsing data;

determining a long-term encoding vector corresponding to the long-termfeature group according to similarities between elements in thelong-term feature group;

determining a user embedding vector corresponding to the short-termfeature group according to the long-term encoding vector andsimilarities between elements in the short-term feature group; and

determining, according to the user embedding vector, at least one webcontent as a recommendation candidate and providing the at least one webcontent to the user.

An embodiment of the disclosure provides an apparatus for processing webcontent, the apparatus including:

at least one memory configured to store program code; and

at least one processor configured to read the program code and operateas instructed by the program code, the program code comprising:

first determining code configured to cause at least one of the at leastone processor to determine a long-term feature group and a short-termfeature group from historical browsing data of a user according togeneration time points of elements in the historical browsing data;

second determining code configured to cause at least one of the at leastone processor to determine a long-term encoding vector corresponding tothe long-term feature group according to similarities between elementsin the long-term feature group;

third determining code configured to cause at least one of the at leastone processor to determine the user embedding vector corresponding tothe short-term feature group according to the long-term encoding vectorand the similarities between the elements in the short-term featuregroup; and

fourth determining code configured to cause at least one of the at leastone processor to determine, according to the user embedding vector, atleast one web content as a recommendation candidate and provide the atleast one web content to the user.

An embodiment of the disclosure further provides a server, including aprocessor and a memory,

the memory being configured to store a computer program; and

the processor being configured to perform, when running the computerprogram, the method for processing web content according to theembodiments of the disclosure.

An embodiment of the disclosure further provides a computer storagemedium, storing a computer program, the computer program beingconfigured to perform the method for processing web content according tothe embodiments of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in example embodiments of thedisclosure or the related art more clearly, the following brieflydescribes the accompanying drawings for describing the exampleembodiments. The accompanying drawings in the following description showonly some embodiments of the disclosure, and a person of ordinary skillin the art may derive other drawings from the accompanying drawingswithout creative efforts.

FIG. 1 is a schematic diagram of an application scenario of a method forprocessing web content according to an embodiment of the disclosure.

FIG. 2 is a flowchart of a method for processing web content accordingto an embodiment of the disclosure.

FIG. 3 is a schematic diagram of composition of a long-term featuregroup and a short-term feature group according to an embodiment of thedisclosure.

FIG. 4 is a schematic diagram of composition of a long-term featuregroup according to an embodiment of the disclosure.

FIG. 5 is a schematic diagram of a method for performing calculation ofa self-attention network model of a multi-head scale dot-product forlong-term embedding sub-vectors according to an embodiment of thedisclosure.

FIG. 6 is a schematic diagram of composition of a short-term featuregroup according to an embodiment of the disclosure.

FIG. 7 is a schematic diagram of a process of determining a short-termembedding sub-vector corresponding to a short-term tag feature groupaccording to an embodiment of the disclosure.

FIG. 8 is a schematic diagram of feature groups included in a personafeature according to an embodiment of the disclosure.

FIG. 9 is a schematic diagram of element composition of a personafeature according to an embodiment of the disclosure.

FIG. 10 is a structural diagram of a match framework networkcorresponding to a method for processing web content according to anembodiment of the disclosure.

FIG. 11 is a structural diagram of a recommendation system using a matchframework network structure according to an embodiment of thedisclosure.

FIG. 12 is a schematic structural diagram of an apparatus for processingweb content according to an embodiment of the disclosure.

FIG. 13 is a structural diagram of a device for processing web contentaccording to an embodiment of the disclosure.

FIG. 14 is a structural diagram of a server according to an embodimentof the disclosure.

DETAILED DESCRIPTION

The following describes example embodiments of the disclosure withreference to accompanying drawings.

In the related art, personalized recommendation may be made for a userbased on historical browsing data of the user; however, in such apersonalized recommendation method, preferences of the user in a readinghistory are not considered. For example, if historical browsing data ofa user includes a passive browsing behavior of the user (such as abrowsing behavior caused by an accidental operation of the user),browsing data generated based on the passive behavior is also counted asa basis for personalized recommendation for the user. As a result,recommended web content does not fully satisfy the browsing interests ofthe user.

In view of this problem, an embodiment of the disclosure provides amethod for processing web content, including: determining, according tohistorical browsing data, a user embedding vector that better highlightsa browsing preference of a user, and then determining, according to theuser embedding vector, web content that is used as recommendationcandidates. This method may increase the possibility that recommendationcandidates meet actual browsing interests of a user, and improve thequality of web content recommended for the user, thereby improving thebrowsing experience of the user.

The following describes application scenarios of this embodiment of thedisclosure. The method provided in this embodiment of the disclosure isapplicable to a data processing device, and the data processing devicemay be a server. A server 101 may be a dedicated server used only formatching web content, where “match” refers to triggering as many correctresults as possible from a full information set, and returning theresults for ranking. “Rank” is to rank all matched content, and selectresults with the highest scores to recommend to the user. This processmay be implemented by using the method for processing web contentprovided in the disclosure. The server 101 may alternatively be a publicserver that further includes other data processing functions, which isnot limited in the embodiments of the disclosure.

For easier understanding of the technical solutions of the disclosure,the method for processing web content provided in this embodiment of thedisclosure is introduced below in combination with example applicationscenarios.

FIG. 1 is a schematic diagram of an application scenario of a method forprocessing web content according to an embodiment of the disclosure. Theapplication scenario includes a server 101, where the server 101 maystore historical browsing data of each user. Then, for a certain user,the server 101 may determine a long-term feature group and a short-termfeature group according to generation time points of elements in thehistorical browsing data of the user. The elements may be items relatedto historical browsing content of the user. For example, the elementsmay be tags in web content that the user has browsed. The elements inthe long-term feature group may be determined based on long-termhistorical browsing data, and the long-term feature group may reflectlong-term browsing interests of the user. The elements in the short-termfeature group may be determined based on short-term historical browsingdata, and the short-term feature group may reflect short-term browsinginterests of the user. For example, if the user has browsed news aboutsports in the past six months, the word “sports” may be used as anelement in the long-term feature group of the user. If the user hasbrowsed news about current affairs in the past day, the term “currentaffairs” may be used as an element in the short-term feature group ofthe user.

The user browses more similar web content that fits interestpreferences. Therefore, the historical browsing data of the user mayinclude more browsing data that fits the interest preferences of theuser. Therefore, the long-term feature group determined based on thehistorical browsing data of the user includes more elements belonging tosimilar web content that fits the browsing interests of the user. Sincethe long-term feature group includes a relatively large number ofelements that fit the interest preferences of the user, each elementtherein has a relatively high similarity with other elements.

In other words, the elements with relatively high similarities in thecorrespondingly determined long-term feature group are likely similarweb content that fits the browsing interests of the user. For example,if the user prefers sports-related web content to currentaffairs-related web content, the user browses more sports-related webcontent and less current affairs-related web content. As a result, thedetermined long-term feature group may include more elements related tosports and fewer elements related to current affairs. For example, thelong-term feature group includes 8 sports-related elements and 2 currentaffairs-related elements. Then, because the number of sports-relatedelements in the long-term feature group is larger, each sports-relatedelement may have a higher similarity with other elements. It may belearned that elements with higher similarities may better highlight thebrowsing interest preferences of the user.

Based on this, the long-term encoding vector corresponding to thelong-term feature group may be determined according to similaritiesbetween the elements in the long-term feature group. Since the long-termencoding vector is obtained according to the similarities between theelements in the long-term feature group, elements with highersimilarities may reflect more information in the long-term encodingvector. Therefore, the long-term encoding vector may better reflectdegrees of preference of the user for the browsing interests.

The interest preferences of the user may change over time. For example,the user has developed a new interest preference recently. Thus,elements in the short-term feature group may also be taken intoconsideration. Then a user embedding vector corresponding to theshort-term feature group may be determined according to similaritiesbetween the long-term encoding vector and the elements in the short-termfeature group. Because the user embedding vector is determined based onthe similarities between the long-term encoding vector and the elementsin the short-term feature group, the determined user embedding vectornot only highlights information about long-term browsing interestpreferences of the user, but also partly retains other information.

For example, the user has been interested in sports-related web contentover a long time, and has barely browsed web content related to onlineshopping; and the user recently browses more web content related toonline shopping in addition to sports-related web content.Correspondingly, the determined short-term feature group may includemore elements related to online shopping. If the determined long-termfeature group does not include online shopping information of the user,the user embedding vector corresponding to the short-term feature groupis determined according to the similarities between the long-termencoding vector and the elements in the short-term feature group.Because the user embedding vector is determined based on thesimilarities between the long-term encoding vector and the elements inthe short-term feature group, the determined user embedding vector stillhighlights information about long-term browsing interest preferences(related to sports) of the user, and further correspondingly retainsinformation about a new interest (related to online shopping) recentlydeveloped by the user.

As a result, the web content determined according to the user embeddingvector as the recommendation candidates is more likely to fit actualbrowsing interests of the user, and is more generalized (or have acertain level of generalization, referring to the generalization abilityin machine learning or artificial intelligence (AI) field), therebyimproving the quality of web content recommended for the user. The usermay easily obtain content of interest through the corresponding process,which improves the browsing experience.

The method for processing web content provided in an embodiment of thedisclosure is described below in detail with reference to theaccompanying drawings.

FIG. 2 is a flowchart of a method for processing web content accordingto an embodiment of the disclosure. The method includes operationsS201-S204.

S201: Determine a long-term feature group and a short-term feature groupfrom historical browsing data according to generation time points ofelements in the historical browsing data.

When a user browses web content, a server 101 may generate and savebrowsing data corresponding to the user accordingly. In this way, theserver 101 may store historical browsing data for each of a plurality ofdifferent users in a long period of time in the past.

In this embodiment of the disclosure, for a certain user, elements ofhistorical browsing data generated in a long period of time in the pastmay be determined from historical browsing data based on generation timepoints of the elements in the historical browsing data of the user, toserve as elements in a long-term feature group, thereby determining thelong-term feature group. Elements of historical browsing data generatedrecently are determined from the historical browsing data based on thegeneration time points of the elements in the historical browsing dataof the user, to serve as elements in a short-term feature group, therebydetermining the short-term feature group.

In some embodiments of the disclosure, the short-term feature group ofthe user may be determined based on, for example, historical browsingdata corresponding to documents (or contents) recently read by the user.

Since user basic attribute information may affect browsing interests ofthe user in a long-term period, the user basic attribute information maybe used as an element in the long-term feature group. The user basicattribute information may include, for example, gender, age, andprovince of the user.

An illustrative example below is used for description. It is assumedthat a user U1 has recently clicked to visit an article A1, an articleA2, and an article A3. When an article A4 that the user U1 may read nextis to be predicted, a long-term feature group and a short-term featuregroup may be determined from historical browsing data according togeneration time points of elements in the historical browsing data.

FIG. 3 is a schematic diagram of composition of a long-term featuregroup and a short-term feature group according to an embodiment of thedisclosure. As shown in FIG. 3 , the long-term feature group may bedetermined based on long-term historical browsing data of the user. Thelong-term feature group may include: Tag 1, Tag 2, Tag 3, Tag 1′, Tag2′, Tag 3′, Category 1, Category 2, Category 3, Category 1′, Category2′, Category 3′, Male (gender), 34 (age), and Beijing (province).

The tags may be, for example, a group of words extracted from webcontent (such as article titles or body text) browsed by the user inhistory, and the tags may be used for indicating core content of the webcontent. The category may be, for example, an abstract description ofweb content browsed by the user in history. For example, articlesintroducing sports may belong to the category of sports.

The short-term feature group may be determined according to short-termhistorical browsing data (the article A1, the article A2, and thearticle A3) of the user. The short-term feature group may include: Tag1″, Tag 2″, Tag 3″, Category 1″, Category 2″, Category 3″, documentidentity (ID) 1, document ID 2, and document ID 3. The document ID maybe a number used for identifying a document.

S202: Determine a long-term encoding vector corresponding to thelong-term feature group according to similarities between elements inthe long-term feature group.

In this embodiment of the disclosure, a long-term encoding vectorcorresponding to the long-term feature group may be determined accordingto similarities between the elements in the long-term feature group.

The following is an illustration based on the example corresponding toFIG. 3 . It is assumed that in the long-term feature group shown in FIG.3 , elements related to sports account for 80% of the total; elementsrelated to current affairs account for 15% of the total; and elementsrelated to user basic attribute information account for 5% of the total.It may be seen that the user prefers web content related to sports.

Based on this, because elements related to sports account for a higherproportion in the long-term feature group, the elements related tosports have higher similarities with other elements. Therefore, thelong-term encoding vector is determined according to the similaritiesbetween the elements in the long-term feature group. Since the long-termencoding vector is determined based on the similarities between theelements in the long-term feature group, the long-term encoding vectorreflects more information about elements with high similarities (thatis, elements related to sports).

S203: Determine a user embedding vector corresponding to the short-termfeature group according to the long-term encoding vector andsimilarities between elements in the short-term feature group.

The interest preferences of the user may change. Therefore, after thelong-term encoding vector corresponding to the long-term feature groupis determined, a user embedding vector corresponding to the short-termfeature group may further be determined according to a similaritybetween the long-term encoding vector and each element in the short-termfeature group.

For example, based on the above described example in S202, it is assumedthat the user is interested in shopping recently and has browsed webcontent of some websites recently. In the determined short-term featuregroup, for example, elements related to sports account for 70% of thetotal; elements related to current affairs account for 10% of the total;and elements related to online shopping account for 20% of the total.

Therefore, the user embedding vector corresponding to the short-termfeature group may be determined according to similarities between thelong-term encoding vector determined in S202 and elements in theshort-term feature group. Since the elements related to sports stillaccount for a high proportion in the short-term feature group, and moreinformation related to sports is reflected in the long-term encodingvector, the similarities between the long-term encoding vector and theelements related to sports are high. Therefore, the user embeddingvector determined in this way may still highlight information fittingthe browsing interest preferences (that is, elements related to sports)of the user.

In addition, because the number of elements related to online shoppingcontained in the short-term feature group is relatively small, lessinformation related to online shopping is reflected in the long-termencoding vector, and thus the long-term encoding vector has lowsimilarities with the elements related to online shopping. However,because the user embedding vector is determined according tosimilarities between the long-term encoding vector and elements in theshort-term feature group, the determined user embedding vector stillretains information related to online shopping.

It may be seen that the determined user embedding vector not onlyhighlights the information that fits the browsing interest preferencesof the user, but partly retains other information (such as informationabout a new interest developed recently by the user).

S204: Determine, according to the user embedding vector, web contentthat is used as recommendation candidates.

Therefore, web content to be used as recommendation candidates for theuser may be determined based on the user embedding vector that fullyreflects the browsing interest preferences of the user, so as to improvethe quality of web content recommended for the user. By determining,according to the user embedding vector, the web content to be used asthe recommendation candidates, the web content may thus be matched. Insummary, the long-term feature group and the short-term feature groupare determined from the historical browsing data according to thegeneration time points of the elements in the historical browsing data.In other words, the long-term feature group may reflect long-termbrowsing interests of the user, and the short-term feature group mayreflect short-term browsing interests of the user. The long-termencoding vector corresponding to the long-term feature group isdetermined according to the similarities between the elements in thelong-term feature group. Since the long-term encoding vector is obtainedaccording to the similarities between the elements in the long-termfeature group, elements with higher similarities in the long-termfeature group reflect more information in the long-term encoding vector.Since the user has more browsing behaviors for similar web content thatfits browsing interests, and the determined elements with highsimilarities are similar web content that fits the browsing interests ofthe user, the long-term encoding vector may better reflect degrees ofpreference of the user for the browsing interests. The user embeddingvector corresponding to the short-term feature group is determinedaccording to the long-term encoding vector and the similarities betweenthe elements in the short-term feature group, so that in the userembedding vector, information that fits the browsing interestpreferences of the user may be relatively prominent, and otherinformation is partly retained. The recommendation candidates determinedby the user embedding vector are more likely to fit actual browsinginterests of the user, and have a certain level of generalization(referring to the generalization ability in machine learning or AIfield), which improves the quality of web content recommended for theuser and improves the browsing experience. The recommendation candidatesdetermined in this way are also more customized for the user.

To fully reflect the long-term browsing interest preferences of theuser, in an example embodiment, the elements in the long-term featuregroup may be further classified according to types of the elements, sothat the long-term feature group includes a plurality of long-termsub-type feature groups, where each long-term sub-type feature groupincludes elements of a corresponding type. Description is made belowwith reference to an illustrative example.

FIG. 4 is a schematic diagram of composition of a long-term featuregroup according to an embodiment of the disclosure. Based on the examplein FIG. 3 , the elements in the long-term feature group may beclassified according to the following five types: tags and categoriesdetermined from long-term historical browsing data of a user, tags andcategories determined from historical browsing data of a user in pastseven days, and user basic attribute information. This is merely anexample and the disclosure is not limited thereto.

Therefore, the long-term sub-type feature groups of the long-termfeature group after the classification may be as follows: a long-termtag feature group, a long-term category feature group, a past-seven-daytag feature group, a past-seven-day category feature group, and userbasic attribute information.

The long-term tag feature group may include tag-type elements, forexample, Tag 1, Tag 2, and Tag 3. The long-term category feature groupmay include category-type elements, for example, Category 1, Category 2,and Category 3. The past-seven-day tag feature group may includetag-type elements, for example, Tag 1′, Tag 2′, and Tag 3′. Thepast-seven-day category feature group may include category-typeelements, for example, Category 1′, Category 2′, and Category 3′. Theuser basic attribute information may include Male (gender), 34 (age),and Beijing (province).

Then the method for determining a long-term encoding vectorcorresponding to the long-term feature group according to similaritiesbetween elements in the long-term feature group in S202 may include thefollowing operations:

S301: Determine a long-term embedding sub-vector corresponding to eachlong-term sub-type feature group according to similarities betweenelements in each long-term sub-type feature group.

Correspondingly, elements with high similarities in each long-termsub-type feature group may be similar web content that more fits thebrowsing interests of the user.

Based on this, for each long-term sub-type feature group in theplurality of long-term sub-type feature groups, a correspondinglong-term embedding sub-vector may be determined for each long-termsub-type feature group according to similarities between elements ineach long-term sub-type feature group.

In this way, elements with higher similarities in each long-termsub-type feature group reflect more information in the correspondinglong-term embedding sub-vector. Therefore, the long-term embeddingsub-vector may better reflect degrees of preference of the user for thebrowsing interests for this type of elements.

For example, it is assumed that Tag 1, Tag 2, and Tag 3 included in thelong-term tag feature group are “basketball game”, “basketball star”,and “football game” respectively. Compared with football, the userprefers web content related to basketball. Then, according tosimilarities between the three tags, similarities corresponding tobasketball are higher. The determined long-term embedding sub-vectorcorresponding to the sub-type feature group may highlight informationrelated to basketball. That is, the long-term embedding sub-vectorhighlights information of web content related to basketball preferred bythe user.

It may be seen that, for each long-term sub-type feature group includedin the long-term feature group, the long-term embedding sub-vectorcorresponding to each long-term sub-type feature group is determinedaccording to similarities between elements in each long-term sub-typefeature group. This allows each long-term embedding sub-vector tohighlight information of elements with high similarities in thelong-term sub-type feature group. Therefore, the long-term embeddingsub-vector may fully reflect the interest preferences of the user forthe elements in the corresponding long-term sub-type feature group.

S302: Determine the long-term encoding vector corresponding to thelong-term feature group according to similarities between the long-termembedding sub-vectors.

The interest preferences of the user for different long-term sub-typefeature groups may be different. For this reason, the long-term encodingvector corresponding to the long-term feature group may also bedetermined according to the similarities between the long-term embeddingsub-vectors.

In this way, the determined long-term encoding vector may highlight theinterest preferences of the user for different long-term sub-typefeature groups, and the long-term encoding vector may more accuratelyrepresent long-term browsing interests of the user.

In the embodiments of the disclosure, the method for determining thesimilarities between the elements in the long-term feature group inS202, the method for determining the similarities between the elementsin each long-term sub-type feature group in S301, and the method fordetermining the similarities between the long-term embedding sub-vectorsin S302, may all be implemented based on an attention network model inan example embodiment. The attention network model may be used forobtaining a distribution difference of similarities of input informationby calculating the similarities of the input information, so as todetermine information that is more important to a current task.

Then the method for determining a long-term encoding vectorcorresponding to the long-term feature group according to similaritiesbetween elements in the long-term feature group in S202 may include thefollowing operations:

S401: Determine the similarities between the elements in the long-termfeature group according to an attention network model.

In this embodiment of the disclosure, each element in the determinedlong-term feature group may be mapped to a corresponding embeddingvector, so that the similarities between the elements in the long-termfeature group may be determined by using the attention network model.

S402: Determine the long-term encoding vector corresponding to thelong-term feature group according to the similarities between theelements in the long-term feature group.

The methods provided in S401 and S402 are described in detail below.

First, a calculation method of the attention network model is shown inFormula (1):Attention

(Q,K,V)=soft max(QK ^(T)/√{square root over (d _(k))})V  (1)

As shown in Formula (1), Q may represent Query, K may represent Key, andV may represent Value.

The principle of the attention network model may be as follows: First, adot product (QK^(T)) of Q and each K is calculated to obtain asimilarity between Q and each K, and the dot product is scaled by thecalculation of QK^(t)/√{square root over (d_(k))}, where √{square rootover (d_(k))} may be dimensions of vectors Q, K, and V. Then,QK^(T)/√{square root over (d_(k))} is normalized to obtain a similarityprobability of Q and each K by using a softmax( ) function; and finally,the normalized probabilities are multiplied by the corresponding V andthen summed to obtain a first vector corresponding to Q.

Simply put, after the vectors corresponding to Q, K, and V are inputted,the first vector corresponding to Q may be calculated according toFormula (1), and the first vector may reflect similarities between Q andK and between Q and V.

The following introduces the method of the attention network model byusing an example of determining similarities between elements in thelong-term feature group according to the attention network model.

Since variables inputted into the attention network model are elementsin the long-term feature group, that is, same-source data, the attentionnetwork model for calculation on the same-source data may be denoted asa self-attention network model. In this embodiment, for each elementX_(i) in the long-term feature group, when similarities of the elementX_(i) with other elements are determined for the element X_(i), anembedding vector corresponding to the element X_(i) may be denoted by Q,and embedding vectors corresponding to the remaining elements in thelong-term feature group may be denoted by K and V. Then, the firstvector corresponding to the element X_(i) may be determined by using theself-attention network model, that is, Formula (1), and the first vectormay include similarities between the element X_(i) and the remainingelements in the long-term feature group.

In this embodiment of the disclosure, a vector of Q may be determinedbased on an attention network model of a multi-head scale dot-product.Each head in the multi-head scale dot-product is expressed in Formula(2):head_(i)=Attention

(QW _(i) ^(Q) ,KW _(i) ^(K) ,VW _(i) ^(V))  (2)

where an attention mechanism for any head in the multi-head scaledot-product may be as follows: before Q, K, and V are inputted into theattention network model, i.e., Formula (1), a linear transformation isperformed on each Q, K, and V by using QW_(i) ^(Q), KW_(i) ^(K), andVW_(i) ^(V), so that Q, K, V are mapped into a space, and second vectorsof Q, K, and V are obtained respectively. W_(i) ^(Q), W_(i) ^(K), andW_(i) ^(V) may be mapping matrices used for linear transformation. Thesecond vectors are then inputted to the attention network model, i.e.,Formula (1), to obtain the first vector of Q corresponding to the head.

In this way, Q, K, and V may be mapped into different spaces throughdifferent linear transformations, and then first vectors of Qcorresponding to different heads may be obtained.

After the first vector of Q corresponding to each head is determined, asshown in Formula (3), the first vectors of Q corresponding to differentheads may be concatenated and then multiplied by the correspondingmapping matrix W₀, so that a new vector obtained is used as a thirdvector of Q.H=[head₁,head₂,head₃, . . . head_(n) ]W ₀  (3)

In this embodiment of the disclosure, for each element X_(i) in thelong-term feature group, the third vector of each element X_(i) may bedetermined by using the same self-attention network model of themulti-head scale dot-product. The third vector of each element X_(i) inthe long-term feature group incorporate information of other elements,and the third vector of each element X_(i) may be mapped into the samemulti-dimensional space.

Next, after the third vector of each element X_(i) in the long-termfeature group is determined, a weight corresponding to each elementX_(i) may be determined based on similarities between each element X_(i)and other elements, and the manner of determining the weight of eachelement X_(i) may be as shown in Formula (4):a _(i)=soft max(v _(a) tanh(W _(a) H ^(T)))  (4)

H^(T) in Formula (4) may be obtained from an output result of Formula(3), W_(a) may be a mapping matrix, v_(a) may be a weight mappingvector, and then v_(a) tanh(W_(a)H^(T)) is normalized by using thesoftmax( ) function, thereby obtaining the weight of each element X_(i).

Finally, the weight of each element X_(i) is assigned to the thirdvector corresponding to the corresponding element X_(i), so as to obtaina target vector of each element X_(i) including weight information,where a corresponding operation method is as shown in Formula (5):c=Ha ^(T)  (5)

Weighted average pooling is performed on the target vector of eachelement X_(i) to obtain the long-term encoding vector corresponding tothe long-term feature group.

Correspondingly, the method of the embodiment corresponding to S301-S302may include the following operations:

S501: Determine the similarities between the elements in each long-termsub-type feature group according to an attention network model.

S502: Determine the long-term embedding sub-vector corresponding to eachlong-term sub-type feature group according to the similarities betweenthe elements in each long-term sub-type feature group.

In this embodiment of the disclosure, the similarities between theelements in each long-term sub-type feature group may be determinedaccording to the self-attention network model of a multi-head scaledot-product in the foregoing embodiment. Then the long-term embeddingsub-vector corresponding to each long-term sub-type feature group isdetermined according to the similarities between the elements in eachlong-term sub-type feature group.

The method provided in S501-S502 is described by using an example inwhich a corresponding long-term embedding sub-vector is determined for along-term sub-type feature group: the third vector of each element inthe feature group may be determined according to Formula (1), Formula(2), and Formula (3), and the third vector of each element may includesimilarity relationships with other elements. Then, the weight of eachelement may be obtained according to Formula (4), and the weight of eachelement may be assigned to the third vector corresponding to eachelement according to Formula (5) to obtain the target vector of eachelement. Finally, weighted average pooling is performed on the targetvector of each element to obtain the long-term embedding sub-vectorcorresponding to the long-term sub-type feature group.

In addition, elements with extremely low weights in the long-termsub-type feature group may be used as noisy data of the user, so thatthe noisy data may be removed when a long-term embedding sub-vector isdetermined for each long-term sub-type feature group.

S503: Determine similarities between the long-term embedding sub-vectorsaccording to the attention network model.

S504: Determine the long-term encoding vector corresponding to thelong-term feature group according to the similarities between thelong-term embedding sub-vectors.

In this embodiment of the disclosure, for each long-term sub-typefeature group, after the long-term embedding sub-vector corresponding toeach long-term sub-type feature group is determined, calculation of aself-attention network model of a multi-head scale dot-product mayfurther be performed on the long-term embedding sub-vector correspondingto each sub-type feature group.

FIG. 5 is a schematic diagram of a method for performing calculation ofa self-attention network model of a multi-head scale dot-product forlong-term embedding sub-vectors according to an embodiment of thedisclosure. As shown in FIG. 5 , after the corresponding long-termembedding sub-vector (i.e., the determined long-term embeddingsub-vector 1, long-term embedding sub-vector 2, long-term embeddingsub-vector 3 . . . , and long-term embedding sub-vector n) is determinedfor each long-term sub-type feature group, the vectors may be calculatedthrough a self-attention layer of the multi-head scale dot-product toobtain the target vector corresponding to each long-term sub-typefeature group (i.e., the long-term embedding sub-vector 1′, long-termembedding sub-vector 2′, long-term embedding sub-vector 3′ . . . , andlong-term embedding sub-vector n′).

The method of determining the target vector corresponding to eachlong-term sub-type feature group is described in detail below: the thirdvector corresponding to each long-term sub-type feature group may bedetermined according to Formula (1), Formula (2), and Formula (3), andthe third vector of each long-term sub-type feature group may includesimilarity relationships with other long-term sub-type feature groups.Then, the weight of each long-term sub-type feature group may beobtained according to Formula (4), and the weight of each long-termsub-type feature group may be assigned to the third vector correspondingto each long-term sub-type feature group according to Formula (5) toobtain the target vector of each long-term sub-type feature group.

After the target vector corresponding to each long-term sub-type featuregroup is obtained, the target vector corresponding to each long-termsub-type feature group may be concatenated to obtain a long-dimensionalembedding vector, and the long-dimensional embedding vector is passedthrough a multi-layer feedforward neural network to obtain the long-termencoding vector.

The obtained long-term encoding vector may be in the same dimension aseach element in the short-term feature group, making it easier todetermine the user embedding vector corresponding to the short-termfeature group according to the similarities between the obtainedlong-term encoding vector and the elements in the short-term featuregroup in S203.

The determined long-term sub-type feature groups with lower weights aremore likely to be noisy data. Therefore, this method may effectivelylower the weights of such long-term sub-type feature groups, ensuringthat the determined long-term encoding vector is more accurate.

In addition, to fully reflect the short-term browsing interestpreferences of the user, in an example embodiment, the elements in theshort-term feature group may be classified according to types of theelements in the short-term feature group, so that the short-term featuregroup includes a plurality of short-term sub-type feature groups, whereeach short-term sub-type feature group includes elements of acorresponding type. Description is made below with reference to anillustrative example.

FIG. 6 is a schematic diagram of composition of a short-term featuregroup according to an embodiment of the disclosure. Based on the examplein FIG. 3 , the elements in the short-term feature group may beclassified according to the following three types: document IDs, tags,and categories determined from short-term historical browsing data of auser. Therefore, the short-term sub-type feature groups in theshort-term feature group after classification may be as follows: ashort-term tag feature group, a short-term category feature group, and ashort-term document ID feature group.

The short-term tag feature group may include tag-type elements, forexample, Tag 1″, Tag 2″, and Tag 3″. The short-term category featuregroup may include category-type elements, for example, Category 1″,Category 2″, and Category 3″. The short-term document ID feature groupmay include elements of document IDs browsed by the user recently, forexample, document ID 1, Document ID 2, and Document ID 3.

Then the method for determining a user embedding vector corresponding tothe short-term feature group according to similarities between thelong-term encoding vector and elements in the short-term feature groupin S203 may include the following operations:

S601: Determine short-term embedding sub-vectors corresponding to theplurality of short-term sub-type feature groups according tosimilarities between the long-term encoding vector and elements in eachshort-term sub-type feature group.

In this embodiment of the disclosure, the short-term embeddingsub-vectors corresponding to the plurality of short-term sub-typefeature groups may be determined according to the similarities betweenthe long-term encoding vector determined in S202 and the elements ineach short-term sub-type feature group.

S602: Determine the user embedding vector corresponding to theshort-term feature group according to similarities between theshort-term embedding sub-vectors.

In this embodiment of the disclosure, after the corresponding short-termembedding sub-vector is determined for each short-term sub-type featuregroup, the user embedding vector corresponding to the short-term featuregroup may be determined according to the similarities between theshort-term embedding sub-vectors.

In some embodiments of the disclosure, after the correspondingshort-term embedding sub-vector is determined for each short-termsub-type feature group, for example, the short-term embeddingsub-vectors may further be concatenated into a vector, and theconcatenated vector is passed through a fully connected network toobtain the user embedding vector.

Thus, the obtained user embedding vector may highlight the browsinginterest preferences of the user.

In this embodiment of the disclosure, the method for determining thesimilarities between the long-term encoding vector and the elements inthe long-term feature group in S203, the method for determining thesimilarities between the long-term encoding vector and the elements ineach short-term sub-type feature group in S601, and the method fordetermining the similarities between the short-term embeddingsub-vectors in S602, may all be implemented based on an attentionnetwork model in an example embodiment.

Then the method for determining a user embedding vector corresponding tothe short-term feature group according to similarities between thelong-term encoding vector and elements in the short-term feature groupin S203 may include the following operations:

S701: Determine the similarities between the long-term encoding vectorand the elements in the short-term feature group according to anattention network model.

S702: Determine the user embedding vector corresponding to theshort-term feature group according to the long-term encoding vector andthe similarities between the elements in the short-term feature group.

The following describes the method of S701-S702 in detail: the thirdvector corresponding to the long-term encoding vector may be determinedaccording to Formula (1), Formula (2), and Formula (3), where the thirdvector of the long-term encoding vector may reflect the similaritybetween the long-term encoding vector and each element in the short-termfeature group. Then, the corresponding weight between the long-termencoding vector and each element in the short-term feature group may beobtained according to Formula (4), and the corresponding weight betweenthe long-term encoding vector and each element in the short-term featuregroup may be respectively assigned to each element in the short-termfeature group according to Formula (5), so as to obtain the targetvector of each element. Then the user embedding vector corresponding tothe short-term feature group is determined according to the determinedtarget vector of each element in the short-term feature group.

Correspondingly, the method of the embodiment corresponding to S601-S602may include the following operations:

S801: Determine the similarities between the long-term encoding vectorand the elements in each short-term sub-type feature group according toan attention network model.

S802: Determine the short-term embedding sub-vectors corresponding tothe plurality of short-term sub-type feature groups according to thesimilarities between the long-term encoding vector and the elements ineach short-term sub-type feature group.

In this embodiment of the disclosure, the similarities between thelong-term encoding vector and the elements in each short-term sub-typefeature group may be determined according to the attention network modelof the multi-head scale dot-product in the foregoing embodiment. Theshort-term embedding sub-vectors corresponding to the plurality ofshort-term sub-type feature groups are determined according to thesimilarities between the long-term encoding vector and the elements ineach short-term sub-type feature group.

The following provides description by using an example of determining ashort-term embedding sub-vector corresponding to a short-term tagfeature group. FIG. 7 is a schematic diagram of a process of determininga short-term embedding sub-vector corresponding to a short-term tagfeature group according to an embodiment of the disclosure. As shown inFIG. 7 , it is assumed that the short-term tag feature group, namely, ashort-term feature group, includes n short-term tags. Then short-termtags are: a short-term tag 1″, a short-term tag 2″, a short-term tag 3″,. . . , and a short-term tag n″. A third vector′ corresponding to thelong-term encoding vector may be determined according to Formula (1),Formula (2), and Formula (3), where the third vector′ of the long-termencoding vector may reflect the similarity between the long-termencoding vector and the vector corresponding to each tag m″, wherem″″=1, 2, 3, . . . n. Next, a weight between the long-term encodingvector and the vector corresponding to each tag m″ may be obtainedaccording to Formula (4), and the weight between the long-term encodingvector and the vector corresponding to each tag m″ may be assigned tothe vector corresponding to each tag m″ according to Formula (5), toobtain a target vector corresponding to each tag m″ (that is, the vectorcorresponding to the tag m″). Furthermore, weighted average pooling isperformed on determined target vector corresponding to each tag m″ todetermine the short-term embedding sub-vector corresponding to theshort-term tag feature group.

As can be seen, the elements in each short-term sub-type feature groupthat have relatively low weights with respect to the long-term encodingvector are more likely to be new browsing interests recently developedby the user. Therefore, although the weights of such elements arelowered by this method, the determined short-term embedding sub-vectorcorresponding to each short-term sub-type feature group still retainsinformation of such elements.

S803: Determine similarities between the short-term embeddingsub-vectors according to the attention network model.

S804: Determine the user embedding vector corresponding to theshort-term feature group according to the similarities between theshort-term embedding sub-vectors.

In an embodiment of the disclosure, for each short-term sub-type featuregroup, after the short-term embedding sub-vector corresponding to eachshort-term sub-type feature group is determined, calculation of aself-attention network model of a multi-head scale dot-product mayfurther be performed on the short-term embedding sub-vectorcorresponding to each sub-type feature group.

For example, for the three short-term sub-type feature groups: theshort-term tag feature group, the short-term category feature group, andthe short-term document ID feature group, after corresponding short-termembedding sub-vectors are determined for the three short-term sub-typefeature groups respectively, the third vector corresponding to eachshort-term sub-type feature group may be determined according to Formula(1), Formula (2), and Formula (3), and the third vector of eachshort-term sub-type feature group may include similarity relationshipswith other short-term sub-type feature groups. Then, the weight of eachshort-term sub-type feature group may be obtained according to Formula(4), and the weight of each short-term sub-type feature group may beassigned to the third vector corresponding to each short-term sub-typefeature group according to Formula (5) to obtain the target vector ofeach short-term sub-type feature group.

After the target vector corresponding to each short-term sub-typefeature group is obtained, the long-term encoding vector and the targetvector corresponding to each short-term sub-type feature group may beconcatenated to obtain a long-dimensional embedding vector, and thelong-dimensional embedding vector is passed through a multi-layer fullyconnected network to obtain the user embedding vector.

The determined short-term sub-type feature groups with lower weights aremore likely to be noisy data. Therefore, this method may effectivelylower the weights of such short-term sub-type feature groups, ensuringthat the determined user embedding vector is more accurate.

After the user embedding vector that may highlight the browsing interestpreferences of the user is determined, the method for determining,according to the user embedding vector, web content that is used asrecommendation candidates in S204 may include the following operations:

S901: Determine similarities between pending web content and the userembedding vector.

In this embodiment of the disclosure, high-quality web content (orhaving high degree of matching) may be selected in advance as pendingweb content, and similarities between pending web content and the userembedding vector may be determined. Pending web content that more fitsthe browsing interest preferences of the user may be selected from thepreset pending web content and recommended to the user.

In some embodiments of the disclosure, for example, a cosine similaritybetween pending web content and the user embedding vector may becalculated to determine a similarity between the pending network contentand the user embedding vector. The cosine similarity may be determinedby calculating the cosine of an angle between two vectors.

For example, assuming that currently selected pending web content is X₁,X₂, X₃ . . . , X_(N), a cosine similarity between a vector correspondingto each pending web content and the user embedding vector may becalculated. The formula for cosine similarity is as follows:

$\begin{matrix}{{{Cos}( {u,v} )} = {\sum_{i = 1}^{n}{u_{i} \times {v_{i}/( {\sqrt{\sum_{i = 1}^{n}u_{i}^{2}}\sqrt{\sum_{i = 1}^{n}v_{i}^{2}}} )}}}} & (6)\end{matrix}$

For ease of description, the user embedding vector may be denoted as Eu,and a vector corresponding to any pending web content may be denoted asEv. Then, u_(i) and v_(i) in Formula (6) may be vectors of the samedimensions of Eu and Ev respectively, and n is the number of dimensionsof Eu and Ev. In this way, the similarity between each pending webcontent and the user embedding vector may be determined according toFormula (6), and the determined similarity may represent the similaritybetween each pending web content and the user embedding vector.

S902: Determine pending web content with similarities meeting a presetcondition as the recommendation candidates.

In this embodiment of the disclosure, a preset condition may be set inadvance, and the preset condition may be a condition for determiningthat a pending web content is highly similar to the user embeddingvector. Therefore, after the similarities between the pending webcontent and the user embedding vector are determined, pending webcontent with a similarity meeting the preset condition may be determinedas a recommendation candidate for recommendation to the user.

For example, for 10 pieces of pending web content X₁, X₂, X₃, . . . ,and X₁₀, if similarities between the pending web content X₃, X₅, and X₇and the user embedding vector meet the preset condition, the pending webcontent X₃, X₅, and X₇ may be determined as the recommendationcandidates.

The method for processing web content provided in the embodiments of thedisclosure is described below in detail with reference to anillustrative application scenario.

For a user U1, a persona feature of the user U1 may be determinedaccording to historical browsing data of the user U1. The personafeature may include a long-term feature group and a short-term featuregroup, and the long-term feature group and the short-term feature groupare determined according to generation time points of elements in thehistorical browsing data. In some embodiments of the disclosure, theelements in the short-term feature group may be determined based on, forexample, several articles recently browsed by the user U1.

FIG. 8 is a schematic diagram of feature groups included in a personafeature according to an embodiment of the disclosure. The long-termfeature group may include: a long-term tag feature group, a long-termcategory feature group, a past-seven-day tag feature group, apast-seven-day category feature group, and user basic attributeinformation. The short-term feature group may include: a short-term tagfeature group, a short-term category feature group, and a short-termdocument ID feature group.

FIG. 9 is a schematic diagram of element composition of a personafeature according to an embodiment of the disclosure. FIG. 9 showselements of long-term sub-type feature groups and short-term sub-typefeature groups in the persona feature of the user U1.

After the persona feature of the user U1 is determined, FIG. 10 shows astructural diagram of a match framework network corresponding to amethod for processing web content according to an embodiment of thedisclosure. As shown in FIG. 10 , first, long-term embedding sub-vectorscorresponding to the long-term sub-type feature groups may be determinedbased on the elements in the long-term sub-type feature groups accordingto the self-attention network model corresponding to Formulas (1) to(5). Then, according to the self-attention layer of the multi-head scaledot-product between the long-term sub-type feature groups, a targetvector corresponding to each long-term sub-type feature group isdetermined. Then the target vectors corresponding to the long-termsub-type feature groups are concatenated to obtain a long-dimensionalembedding vector, and finally the long-term encoding vectorcorresponding to the user U1 is obtained through the multi-layerfeedforward neural network. An activation function of each layer offeedforward neural network may be a rectified linear unit (ReLU).

After the long-term encoding vector is determined, based on theattention network model, the short-term embedding sub-vectorcorresponding to each short-term sub-type feature group may bedetermined according to the similarities between the long-term encodingvector and the elements in each short-term sub-type feature group. Thenthe long-term encoding vector is concatenated with each short-termembedding sub-vector to obtain a new vector, and the new vector ispassed through a fully connected network, so as to obtain a userembedding vector corresponding to the user U1.

Thus, the user embedding vector corresponding to the user U1 may beinputted into a k-nearest neighbor (k-NN) classifier, therebyimplementing the match of candidates. In addition, the user embeddingvector may also be normalized, similarities between the normalized userembedding vector and vectors corresponding to other pending web contentare calculated, and similarity results are sent to a k-NN server.

In this embodiment of the disclosure, the structural diagram of thematch framework network is applicable to some online recommendationsystems. For example, FIG. 11 is a structural diagram of arecommendation system using a match framework network structureaccording to an embodiment of the disclosure. The recommendation systemshown in FIG. 11 may include a match logic, a primary selection logic,and a ranking logic.

A sequence match model in the match logic may obtain a recent readingsequence and a persona feature of a user from a data system, and performencoding by using a trained network. In this way, a user embeddingvector is determined, and then candidates that meet a preset conditionare determined from pending web content for matching and recommendation.

The primary selection logic may be used for initially filtering aplurality of match results according to specific rules (for example,user document relevance, timeliness, region, and diversity), therebyreducing the amount of calculation for the subsequent ranking logic. Inaddition, the user embedding vector may also be used as a feature in theprimary selection logic to provide more refined semantic features forthe primary selection.

The ranking logic may be used for ranking final results according to,for example, a click-through rate (CTR) estimation model, therebypresenting ranked recommendation items to the user. The ranking logicmay be used to rank a plurality of web contents, that are determined asmatching, according to categories of the plurality of web contents, andadjust an order of displayed web contents according to a result of theranking of the plurality of web contents.

Based on the method for processing web content according to theforegoing embodiment(s), an embodiment of the disclosure furtherprovides an apparatus for processing web content. FIG. 12 is a schematicstructural diagram of an apparatus for processing web content accordingto an embodiment of the disclosure. The apparatus includes a firstdetermining unit 1201, a second determining unit 1202, a thirddetermining unit 1203, and a fourth determining unit 1204:

the first determining unit 1201 being configured to determine along-term feature group and a short-term feature group from historicalbrowsing data according to generation time points of elements in thehistorical browsing data;

the second determining unit 1202 being configured to determine along-term encoding vector corresponding to the long-term feature groupaccording to similarities between elements in the long-term featuregroup;

the third determining unit 1203 being configured to determine the userembedding vector corresponding to the short-term feature group accordingto the long-term encoding vector and the similarities between theelements in the short-term feature group; and

the fourth determining unit 1204 being configured to determine,according to the user embedding vector, web content that is used asrecommendation candidates.

In some embodiments of the disclosure, the second determining unit 1202is further configured to:

determine a long-term embedding sub-vector corresponding to eachlong-term sub-type feature group according to similarities betweenelements in each long-term sub-type feature group, the long-term featuregroup comprising a plurality of long-term sub-type feature groups; and

determine the long-term encoding vector corresponding to the long-termfeature group according to similarities between the long-term embeddingsub-vectors.

In some embodiments of the disclosure, the second determining unit 1202is further configured to:

determine the similarities between the elements in the long-term featuregroup according to an attention network model; and

determine the long-term encoding vector corresponding to the long-termfeature group according to the similarities between the elements in thelong-term feature group.

In some embodiments of the disclosure, the third determining unit 1203is further configured to:

determine short-term embedding sub-vectors corresponding to theplurality of short-term sub-type feature groups according tosimilarities between the long-term encoding vector and elements in eachshort-term sub-type feature group, the short-term feature groupincluding the plurality of short-term sub-type feature groups; and

determine the user embedding vector corresponding to the short-termfeature group according to similarities between the short-term embeddingsub-vectors.

In some embodiments of the disclosure, the third determining unit 1203is further configured to:

determine the similarities between the long-term encoding vector and theelements in the short-term feature group according to an attentionnetwork model; and

determine the user embedding vector corresponding to the short-termfeature group according to the long-term encoding vector and thesimilarities between the elements in the short-term feature group.

In some embodiments of the disclosure, the fourth determining unit 1204is further configured to:

determine similarities between pending web content and the userembedding vector; and

determine pending web content with similarities meeting a presetcondition as the recommendation candidates.

In summary, the long-term feature group and the short-term feature groupare determined from the historical browsing data according to thegeneration time points of the elements in the historical browsing data.In other words, the long-term feature group may reflect long-termbrowsing interests of a user, and the short-term feature group mayreflect short-term browsing interests of a user. The long-term encodingvector corresponding to the long-term feature group is determinedaccording to the similarities between the elements in the long-termfeature group. Since the long-term encoding vector is obtained accordingto the similarities between the elements in the long-term feature group,elements with higher similarities in the long-term feature group reflectmore information in the long-term encoding vector. Since the user hasmore browsing behaviors for similar web content that fits browsinginterests, and the determined elements with high similarities aresimilar web content that fits the browsing interests of the user, thelong-term encoding vector may better reflect degrees of preference ofthe user for the browsing interests. The user embedding vectorcorresponding to the short-term feature group is determined according tothe long-term encoding vector and the similarities between the elementsin the short-term feature group, so that in the user embedding vector,information that fits the browsing interest preferences of the user maybe relatively prominent, and other information is partly retained. Therecommendation candidates determined by the user embedding vector aremore likely to fit actual browsing interests of the user, and aregeneralized, which improves the quality of web content recommended forthe user and improves the browsing experience.

An embodiment of the disclosure further provides a device for matchingweb content, and the following describes the device for matching webcontent with reference to the accompanying drawings. Referring to FIG.13 , an embodiment of the disclosure provides a device for processingweb content, and the device may alternatively be a terminal device. Theterminal device may be any smart terminal including a mobile phone, atablet computer, a personal digital assistant (PDA), a point of sales(POS), or an on-board computer, and the terminal device being a mobilephone is used as an example.

FIG. 13 is a block diagram of a partial structure of a mobile phonerelated to a terminal device according to an embodiment of thedisclosure. Referring to FIG. 13 , the mobile phone includes componentssuch as a radio frequency (RF) circuit 1310, a memory 1320, an inputunit 1330, a display unit 1340, a sensor 1350, an audio circuit 1360, awireless fidelity (Wi-Fi) module 1370, a processor 1380, and a powersupply 1390. A person skilled in the art would understand that thestructure of the mobile phone shown in FIG. 13 does not constitute anylimitation on the mobile phone, and instead, the mobile phone mayinclude more or fewer components than those shown in the figure, or somecomponents may be combined, or a different component deployment may beused.

The following makes a detailed description of the components of themobile phone with reference to FIG. 13 .

The RF circuit 1310 may be configured to receive and send signals duringan information receiving and sending process or a call process. Forexample, the RF circuit 1310 receives downlink information from a basestation, then delivers the downlink information to the processor 1380for processing, and sends designed uplink data to the base station. TheRF circuit 1310 may include, but is not limited to, an antenna, at leastone amplifier, a transceiver, a coupler, a low noise amplifier (LNA), aduplexer, and the like. In addition, the RF circuit 1310 may alsocommunicate with a network and another device through wirelesscommunication. The wireless communication may use any communicationstandard or protocol, including, but not limited to a Global System forMobile communications (GSM), a general packet radio service (GPRS), codedivision multiple access (CDMA), wideband code division multiple access(WCDMA), Long Term Evolution (LTE), an email, a short messaging service(SMS), and the like.

The memory 1320 may be configured to store a software program and/or amodule. The processor 1380 runs the software program and/or the modulethat are stored in the memory 1320, to implement various functionalapplications and data processing of the mobile phone. The memory 1320may mainly include a program storage area and a data storage area. Theprogram storage area may store an operating system, an applicationprogram used by at least one function (for example, a sound playbackfunction and an image display function), and the like. The data storagearea may store data (for example, audio data and an address book)created according to the use of the mobile phone, and the like. Inaddition, the memory 1020 may include a high-speed random access memory,and may also include a nonvolatile memory, for example, at least onemagnetic disk storage device, a flash memory, or another volatilesolid-state storage device.

The input unit 1330 may be configured to receive input data (e.g., digitor character information), and generate an input signal (e.g., keyboardinput signal) related to the user setting and function control of themobile phone. For example, the input unit 1330 may include a touch panel1331 and another input device 1332. The touch panel 1331, which may alsobe referred to as a touchscreen, may collect a touch operation of a useron or near the touch panel (such as an operation of a user on or nearthe touch panel 1331 by using any suitable object or accessory such as afinger or a stylus), and drive a corresponding connection apparatusaccording to a preset program. In some embodiments of the disclosure,the touch panel 1331 may include two parts: a touch detection apparatusand a touch controller. The touch detection apparatus detects a touchposition of the user, detects a signal generated by the touch operation,and transfers the signal to the touch controller. The touch controllerreceives the touch information from the touch detection apparatus,converts the touch information into touch point coordinates, andtransmits the touch point coordinates to the processor 1380. Moreover,the touch controller may receive and execute a command sent from theprocessor 1380. In addition, the touch panel 1331 may be implemented byusing various types, such as a resistive type, a capacitance type, aninfrared type, and a surface acoustic wave type. In addition to thetouch panel 1331, the input unit 1330 may further include the anotherinput device 1332. For example, the another input device 1332 mayinclude, but is not limited to, one or more of a physical keyboard, afunctional key (such as a volume control key or a switch key), a trackball, a mouse, and a joystick.

The display unit 1340 may be configured to display information inputtedby the user or information provided for the user, and various menus ofthe mobile phone. The display unit 1340 may include a display panel1341. In some embodiments of the disclosure, the display panel 1341 maybe configured in the form of a liquid crystal display (LCD), an organiclight-emitting diode (OLED), or the like. The touch panel 1331 may coverthe display panel 1341. After detecting a touch operation on or near thetouch panel 1331, the touch panel transfers the touch operation to theprocessor 1380, so as to determine a type of the touch event. Then, theprocessor 1380 provides corresponding visual output on the display panel1341 according to the type of the touch event. Although in FIG. 13 , thetouch panel 1331 and the display panel 1341 are used as two separateparts to implement input and output functions of the mobile phone, insome embodiments, the touch panel 1331 and the display panel 1341 may beintegrated to implement the input and output functions of the mobilephone.

The mobile phone may further include at least one sensor 1350 such as anoptical sensor, a motion sensor, and other sensors. For example, theoptical sensor may include an ambient light sensor and a proximitysensor, where the ambient light sensor may adjust luminance of thedisplay panel 1341 according to the luminance of the ambient light, andthe proximity sensor may switch off the display panel 1341 and/orbacklight when the mobile phone is moved to the ear. As one type ofmotion sensor, an acceleration sensor may detect magnitude ofaccelerations in various directions (generally on three axes), maydetect magnitude and a direction of the gravity when static, and may beapplied to an application that recognizes the attitude of the mobilephone (for example, switching between landscape orientation and portraitorientation, a related game, and magnetometer attitude calibration), afunction related to vibration recognition (such as a pedometer and aknock), and the like. Other sensors, such as a gyroscope, a barometer, ahygrometer, a thermometer, and an infrared sensor, which may beconfigured in the mobile phone, are not further described herein.

The audio circuit 1360, a speaker 1361, and a microphone 1362 mayprovide audio interfaces between a user and the mobile phone. The audiocircuit 1360 may convert received audio data into an electrical signaland transmit the electrical signal to the speaker 1361. The speaker 1361converts the electrical signal into a sound signal for output. On theother hand, the microphone 1362 converts a collected sound signal intoan electrical signal. The audio circuit 1360 receives the electricalsignal, converts the electrical signal into audio data, and outputs theaudio data to the processor 1380 for processing. Then, the processor1380 sends the audio data to, for example, another mobile phone by usingthe RF circuit 1310, or outputs the audio data to the memory 1320 forfurther processing.

Wi-Fi is a short distance wireless transmission technology. The mobilephone may help, by using the Wi-Fi module 1370, a user to receive andtransmit an email, browse a web page, access stream media, and the like.This provides wireless broadband Internet access for the user. AlthoughFIG. 13 shows the Wi-Fi module 1370, it may be understood that the Wi-Fimodule is not a necessary component of the mobile phone, and the Wi-Fimodule may be omitted provided that the scope of the essence of thepresent disclosure is not changed.

The processor 1380 is a control center of the mobile phone, and isconnected to various parts of the entire mobile phone by using variousinterfaces and lines. By running or executing a software program and/ormodule stored in the memory 1320, and invoking data stored in the memory1320, the processor 1380 executes various functions of the mobile phoneand performs data processing, thereby monitoring the entire mobilephone. In some embodiments of the disclosure, the processor 1380 mayinclude one or more processing units. In some embodiments of thedisclosure, the processor 1380 may integrate an application processorand a modem processor. The application processor mainly processes anoperating system, a user interface, an application program, and thelike. The modem processor mainly processes wireless communication. Itmay be understood that the modulation and demodulation processor may notbe integrated into the processor 1380.

The mobile phone further includes the power supply 1390 (such as abattery) for supplying power to the components. In some embodiments ofthe disclosure, the power supply may be logically connected to theprocessor 1380 by using a power management system, thereby implementingfunctions such as charging, discharging, and power consumptionmanagement by using the power management system.

Although not shown in the figure, the mobile phone may further include acamera, a Bluetooth module, and the like. Details are not describedherein again.

In this embodiment, the processor 1380 included in the terminal devicefurther has the following functions:

determining a long-term feature group and a short-term feature groupfrom historical browsing data according to generation time points ofelements in the historical browsing data;

determining a long-term encoding vector corresponding to the long-termfeature group according to similarities between elements in thelong-term feature group;

determining a user embedding vector corresponding to the short-termfeature group according to the long-term encoding vector andsimilarities between elements in the short-term feature group; and

determining, according to the user embedding vector, web content that isused as recommendation candidates.

The device for matching web content provided in the embodiments of thedisclosure may be a server, as shown in FIG. 14 . FIG. 14 is astructural diagram of a server 1400 according to an embodiment of thedisclosure. The server 1400 may vary greatly due to differentconfigurations or performance, and may include one or more centralprocessing units (CPU) 1422 (for example, one or more processors) and amemory 1432, and one or more storage media 1430 (for example, one ormore mass storage devices) that store an application program 1442 ordata 1444. The memory 1432 and the storage medium 1430 may implementtransient storage or permanent storage. The program stored in thestorage medium 1430 may include one or more modules (not shown in thefigure), and each module may include a series of instruction operationson the server. the CPU 1422 may be configured to communicate with thestorage medium 1430 to perform the series of instruction operations inthe storage medium 1430 on the server 1400.

The server 1400 may further include one or more power supplies 1426, oneor more wired or wireless network interfaces 1450, one or moreinput/output interfaces 1458, and/or, one or more operating systems1441, for example, Windows Server™, Mac OS X™, Unix™, Linux™, andFreeBSD™.

The operations performed by the server in the foregoing embodiments maybe based on the server structure shown in FIG. 14 .

A long-term feature group and a short-term feature group are determinedfrom historical browsing data according to generation time points ofelements in the historical browsing data;

a long-term encoding vector corresponding to the long-term feature groupis determined according to similarities between elements in thelong-term feature group;

a user embedding vector corresponding to the short-term feature group isdetermined according to the long-term encoding vector and similaritiesbetween elements in the short-term feature group; and

web content that is used as recommendation candidates is determinedaccording to the user embedding vector.

The terms such as “first”, “second”, “third”, and “fourth” (if any) inthe specification and accompanying drawings of the disclosure are usedfor distinguishing similar objects and not necessarily used fordescribing any particular order or sequence. Data used in this way isinterchangeable in a suitable case, so that the embodiments of thedisclosure described herein may be implemented in a sequence in additionto the sequence shown or described herein. Moreover, the terms“include”, “contain”, and any other variants thereof mean to cover thenon-exclusive inclusion. For example, a process, method, system,product, or device that includes a list of operations or units is notnecessarily limited to those operations or units that are clearlylisted, but may include other operations or units not expressly listedor inherent to such a process, method, system, product, or device.

In the disclosure, “at least one” means one or more, and “a pluralityof” means two or more. The term “and/or” describes an associationbetween associated objects and represents that three associations mayexist. For example, “A and/or B” may indicate that only A exists, only Bexists, and both A and B exist, wherein A and B may be singular orplural. The character “/” in this specification generally indicates an“or” relationship between the associated objects. “At least one of thefollowing items” or a similar expression means any combination of theseitems, including a single item or any combination of a plurality ofitems. For example, at least one of a, b, or c may represent a, b, c, “aand b”, “a and c”, “b and c”, or “a, b, and c”, where a, b, and c may besingular or plural.

In the embodiments provided in the disclosure, it is to be understoodthat the disclosed system, apparatus, and method may be implemented inother manners. For example, the described apparatus embodiment is merelyan example. For example, the unit division is merely logical functiondivision and may be other division during actual implementation. Forexample, a plurality of units or components may be combined orintegrated into another system, or some features may be ignored or notperformed. In addition, the displayed or discussed mutual couplings ordirect couplings or communication connections may be implemented byusing some interfaces. The indirect couplings or communicationconnections between the apparatuses or units may be implemented inelectronic, mechanical, or other forms.

The units described as separate components may or may not be physicallyseparated, and the components displayed as units may or may not bephysical units, and may be located in one place or may be distributedover a plurality of network units. Some or all of the units may beselected according to actual needs to achieve the objectives of thesolutions of the embodiments.

In addition, functional units in the embodiments of the disclosure maybe integrated into one processing unit, or each of the units may existalone physically, or two or more units may be integrated into one unit.The integrated unit may be implemented in a form of hardware, or may beimplemented in a form of a software functional unit.

When the integrated unit is implemented in the form of a softwarefunctional unit and sold or used as an independent product, theintegrated unit may be stored in a computer-readable storage medium.Based on such an understanding, the technical solutions of thedisclosure essentially, or the part contributing to the related art, orall or some of the technical solutions may be implemented in the form ofa software product. The computer software product is stored in a storagemedium and includes several instructions for instructing a computerdevice (which may be a personal computer, a server, a network device, orthe like) to perform all or some of the operations of the methodsdescribed in the embodiments of the disclosure. The foregoing storagemedium includes: any medium that may store program code, such as a USBflash disk, a removable hard disk, a read-only memory (ROM), a randomaccess memory (RAM), a magnetic disk, or an optical disc.

The foregoing embodiments are merely intended for describing thetechnical solutions of the disclosure, but not for limiting thedisclosure. Although the disclosure is described in detail withreference to the foregoing embodiments, persons of ordinary skill in theart understand that they may still make modifications to the technicalsolutions described in the foregoing embodiments or make equivalentreplacements to some technical features thereof, without departing fromthe spirit and scope of the technical solutions of the embodiments ofthe disclosure.

In the embodiments of the disclosure, a long-term feature group and ashort-term feature group are determined from historical browsing dataaccording to generation time points of elements in the historicalbrowsing data; a long-term encoding vector corresponding to thelong-term feature group is determined according to similarities betweenelements in the long-term feature group; a user embedding vectorcorresponding to the short-term feature group is determined according tothe long-term encoding vector and similarities between elements in theshort-term feature group; and at least one web content is determined asa recommendation candidate according to the user embedding vector. Inthe process of matching the web content, since the long-term encodingvector is obtained according to the similarities between the elements inthe long-term feature group, elements with higher similarities in thelong-term feature group reflect more information in the long-termencoding vector. Since the user has more browsing behaviors for similarweb content that fits browsing interests, and the determined elementswith high similarities are similar web content that fits the browsinginterests of the user, the long-term encoding vector may better reflectdegrees of preferences of the user for the browsing interests. Inaddition, the user embedding vector corresponding to the short-termfeature group is determined according to the long-term encoding vectorand the similarities between the elements in the short-term featuregroup, so that in the user embedding vector, information that fits thebrowsing interest preferences of the user may be relatively prominent.The recommendation candidates determined by the user embedding vectorare more likely to fit actual browsing interests of the user, and aremore generalized, which improves the quality of web content recommendedfor the user.

A method and an apparatus for processing web content, a device, and acomputer storage medium according to the embodiments of the disclosurehave at least the following beneficial technical effects.

1) In the embodiments of the disclosure, a long-term feature group and ashort-term feature group are determined from historical browsing dataaccording to generation time points of elements in the historicalbrowsing data. In other words, the long-term feature group may reflectlong-term browsing interests of a user, and the short-term feature groupmay reflect short-term browsing interests of a user. Along-term encodingvector corresponding to the long-term feature group is determinedaccording to similarities between elements in the long-term featuregroup.

2) Since the long-term encoding vector is obtained according to thesimilarities between the elements in the long-term feature group,elements with higher similarities in the long-term feature group reflectmore information in the long-term encoding vector. Since the user hasmore browsing behaviors for similar web content that fits browsinginterests, and the determined elements with high similarities aresimilar web content that fits the browsing interests of the user, thelong-term encoding vector may better reflect degrees of preference ofthe user for the browsing interests. A user embedding vectorcorresponding to the short-term feature group is determined according tothe long-term encoding vector and similarities between elements in theshort-term feature group, so that in the user embedding vector,information that fits the browsing interest preferences of the user maybe more prominent.

3) Recommendation candidates determined by the user embedding vector aremore likely to fit actual browsing interests of the user, are moregeneralized, and are customized for the user, which improves the qualityof web content recommended for the user, and makes it easier for theuser to obtain high-quality (or highly matching) content information.

At least one of the components, elements, modules or units describedherein may be embodied as various numbers of hardware, software and/orfirmware structures that execute respective functions described above,according to an example embodiment. For example, at least one of thesecomponents, elements or units may use a direct circuit structure, suchas a memory, a processor, a logic circuit, a look-up table, etc. thatmay execute the respective functions through controls of one or moremicroprocessors or other control apparatuses. Also, at least one ofthese components, elements or units may be embodied by a module, aprogram, or a part of code, which contains one or more executableinstructions for performing specified logic functions, and executed byone or more microprocessors or other control apparatuses. Also, at leastone of these components, elements or units may further include orimplemented by a processor such as a central processing unit (CPU) thatperforms the respective functions, a microprocessor, or the like. Two ormore of these components, elements or units may be combined into onesingle component, element or unit which performs all operations orfunctions of the combined two or more components, elements of units.Also, at least part of functions of at least one of these components,elements or units may be performed by another of these components,element or units. Further, although a bus is not illustrated in theblock diagrams, communication between the components, elements or unitsmay be performed through the bus. Functional aspects of the aboveexample embodiments may be implemented in algorithms that execute on oneor more processors. Furthermore, the components, elements or unitsrepresented by a block or processing operations may employ any number ofrelated art techniques for electronics configuration, signal processingand/or control, data processing and the like.

While example embodiments of the disclosure have been particularly shownand described, it will be understood by one of ordinary skill in the artthat variations in form and detail may be made therein without departingfrom the spirit and scope of the attached claims.

What is claimed is:
 1. A method for processing web content, performed bya server, the method comprising: determining a long-term feature groupincluding first elements that reflect a long-term browsing interest of auser, by using first historical browsing data of the user that aregenerated in a first predetermined period of a past time, the firstelements including items related to a content of the first historicalbrowsing data; determining a short-term feature group including secondelements that reflect a short-term browsing interest of the user, byusing second historical browsing data of the user that are generated ina second predetermined period of the past time, the second predeterminedperiod being shorter than the first predetermined period and relativelyrecent to a current time, the second elements including items related toa content of the second historical browsing data; determining along-term encoding vector that reflects similarities between the firstelements in the long-term feature group; determining a user embeddingvector that reflects similarities between the long-term encoding vectorand the second elements in the short-term feature group; anddetermining, as a recommendation candidate, at least one web contentbased on a similarity between the at least one web content and the userembedding vector, and providing the at least one web content to theuser.
 2. The method according to claim 1, wherein the long-term featuregroup comprises a plurality of long-term sub-type feature groups, andthe determining the long-term encoding vector comprises: determining along-term embedding sub-vector corresponding to each long-term sub-typefeature group according to similarities between first elements in eachlong-term sub-type feature group; and determining the long-term encodingvector corresponding to the long-term feature group according tosimilarities between long-term embedding sub-vectors.
 3. The methodaccording to claim 1, wherein the determining the long-term encodingvector comprises: determining the similarities between the firstelements in the long-term feature group according to an attentionnetwork model; and determining the long-term encoding vectorcorresponding to the long-term feature group according to thesimilarities between the first elements in the long-term feature group.4. The method according to claim 1, wherein the short-term feature groupcomprises a plurality of short-term sub-type feature groups, and thedetermining the user embedding vector comprises: determining short-termembedding sub-vectors corresponding to the plurality of short-termsub-type feature groups according to similarities between the long-termencoding vector and second elements in each short-term sub-type featuregroup; and determining the user embedding vector corresponding to theshort-term feature group according to similarities between theshort-term embedding sub-vectors.
 5. The method according to claim 1,wherein the determining the user embedding vector comprises: determiningsimilarities between the long-term encoding vector and the secondelements in the short-term feature group according to an attentionnetwork model; and determining the user embedding vector correspondingto the short-term feature group according to the long-term encodingvector and the similarities between the second elements in theshort-term feature group.
 6. The method according to claim 1, whereinthe determining the at least one web content comprises: determining asimilarity between the at least one web content and the user embeddingvector; and determining, as the recommendation candidate, the at leastone web content of which a similarity with the user embedding vectormeets a preset condition.
 7. The method according to claim 6, whereinthe at least one web content comprises a plurality of web contents, andthe method further comprises: ranking the plurality of web contentsaccording to categories of the plurality of web contents; and adjustingan order of displayed web contents according to a result of the rankingof the plurality of web contents.
 8. An apparatus for processing webcontent, the apparatus comprising: at least one memory configured tostore program code; and at least one processor configured to read theprogram code and operate as instructed by the program code, the programcode comprising: long-term feature group determining code configured tocause at least one of the at least one processor to determine along-term feature group including first elements that reflect along-term browsing interest of a user, by using first historicalbrowsing data of the user that are generated in a first predeterminedperiod of a past time, the first elements including items related to acontent of the first historical browsing data; short-term feature groupdetermining code configured to cause at least one of the at least oneprocessor to determine a short-term feature group including secondelements that reflect a short-term browsing interest of the user, byusing second historical browsing data of the user that are generated ina second predetermined period of the past time, the second predeterminedperiod being shorter than the first predetermined period and relativelyrecent to a current time, the second elements including items related toa content of the second historical browsing data; long-term encodingvector determining code configured to cause at least one of the at leastone processor to determine a long-term encoding vector that reflectssimilarities between first elements in the long-term feature group; userembedding vector determining code configured to cause at least one ofthe at least one processor to determine a user embedding vector thatreflects similarities between the long-term encoding vector and thesecond elements in the short-term feature group; and recommendationcandidate determining code configured to cause at least one of the atleast one processor to determine, as a recommendation candidate, atleast one web content based on a similarity between the at least one webcontent and the user embedding vector, and provide the at least one webcontent to the user.
 9. The apparatus according to claim 8, wherein thelong-term feature group comprises a plurality of long-term sub-typefeature groups, and the long-term encoding vector determining code isfurther configured to cause at least one of the at least one processorto determine a long-term embedding sub-vector corresponding to eachlong-term sub-type feature group according to similarities between firstelements in each long-term sub-type feature group; and determine thelong-term encoding vector corresponding to the long-term feature groupaccording to similarities between long-term embedding sub-vectors. 10.The apparatus according to claim 8, wherein the long-term encodingvector determining code is further configured to cause at least one ofthe at least one processor to determine the similarities between thefirst elements in the long-term feature group according to an attentionnetwork model; and determine the long-term encoding vector correspondingto the long-term feature group according to the similarities between thefirst elements in the long-term feature group.
 11. The apparatusaccording to claim 8, wherein the short-term feature group comprises aplurality of short-term sub-type feature groups, and the user embeddingvector determining code is further configured to cause at least one ofthe at least one processor to determine short-term embedding sub-vectorscorresponding to the plurality of short-term sub-type feature groupsaccording to similarities between the long-term encoding vector andsecond elements in each short-term sub-type feature group; and determinethe user embedding vector corresponding to the short-term feature groupaccording to similarities between the short-term embedding sub-vectors.12. The apparatus according to claim 8, wherein the user embeddingvector determining code is further configured to cause at least one ofthe at least one processor to determine similarities between thelong-term encoding vector and the second elements in the short-termfeature group according to an attention network model; and determine theuser embedding vector corresponding to the short-term feature groupaccording to the long-term encoding vector and the similarities betweenthe second elements in the short-term feature group.
 13. The apparatusaccording to claim 8, wherein the recommendation candidate determiningcode configured to cause at least one of the at least one processor todetermine a similarity between the at least one web content and the userembedding vector; and determine, as the recommendation candidate, the atleast one web content of which a similarity with the user embeddingvector meets a preset condition.
 14. The apparatus according to claim13, wherein the at least one web content comprises a plurality of webcontents, and the program code further comprises: ranking codeconfigured to cause at least one of the at least one processor to rankthe plurality of web contents according to categories of the pluralityof web contents; and adjusting code configured to cause at least one ofthe at least one processor to adjust an order of displayed web contentsaccording to a result of the ranking of the plurality of web contents.15. A server, comprising a processor and a memory, the memory beingconfigured to store a computer program; and the processor beingconfigured to perform, when running the computer program, the method forprocessing web content according to claim
 1. 16. A non-transitorycomputer-readable storage medium, configured to store a computerprogram, the computer program being executable by at least one processorto perform: determining a long-term feature group including firstelements that reflect a long-term browsing interest of a user, by usingfirst historical browsing data of the user that are generated in a firstpredetermined period of a past time, the first elements including itemsrelated to a content of the first historical browsing data; determininga short-term feature group including second elements that reflect ashort-term browsing interest of the user, by using second historicalbrowsing data of the user that are generated in a second predeterminedperiod of the past time, the second predetermined period being shorterthan the first predetermined period and relatively recent to a currenttime, the second elements including items related to a content of thesecond historical browsing data; determining a long-term encoding vectorthat reflects similarities between the first elements in the long-termfeature group; determining a user embedding vector that reflectssimilarities between the long-term encoding vector and the secondelements in the short-term feature group; and determining, as arecommendation candidate, at least one web content based on a similaritybetween the at least one web content and the user embedding vector, andproviding the at least one web content to the user.